void configureSensor(void)
{
  tsl2561.setGain(TSL2561_GAIN_16X);      // set 16x gain (for dim situations)
  tsl2561.setTiming(TSL2561_INTEGRATIONTIME_402MS);  // longest integration time (dim light)500-65535

  // tsl.setGain(TSL2591_GAIN_LOW);    // 1x gain (bright light)
  tsl2591.setGain(TSL2591_GAIN_MED);      // 25x gain
  // tsl.setGain(TSL2591_GAIN_HIGH);   // 428x gain

  // Changing the integration time gives you a longer time over which to sense light
  // longer timelines are slower, but are good in very low light situtations!
  //tsl.setTiming(TSL2591_INTEGRATIONTIME_100MS);  // shortest integration time (bright light)
  // tsl.setTiming(TSL2591_INTEGRATIONTIME_200MS);
  // tsl.setTiming(TSL2591_INTEGRATIONTIME_300MS);
  //tsl2591.setTiming(TSL2591_INTEGRATIONTIME_400MS);//1k green 2.14v
  //tsl.setTiming(TSL2591_INTEGRATIONTIME_500MS);
   tsl2591.setTiming(TSL2591_INTEGRATIONTIME_600MS);  // longest integration time (dim light)
}
void sensorRead(void)
{
  lum2561 = tsl2561.getFullLuminosity();
  lum2591 = tsl2591.getFullLuminosity();
  ir2561 = lum2561 >> 16;
  full2561 = lum2561 & 0xFFFF;
  ir2591 = lum2591 >> 16;
  full2591 = lum2591 & 0xFFFF;
  Serial.print("IR6: "); Serial.print(ir2561);   Serial.print("\t");
  Serial.print("Full6: "); Serial.print(full2561);   Serial.print("\t");
  Serial.print("IR9: "); Serial.print(ir2591);   Serial.print("\t");
  Serial.print("Full9: "); Serial.print(full2591);   Serial.print("\n");
  uint16_t *uint16Buff = new uint16_t[4];//
  uint16Buff[0] = ir2561;
  uint16Buff[1] = full2561;
  uint16Buff[2] = ir2591;
  uint16Buff[3] = full2591;
  char *buff=(char *)uint16Buff;//
  udp.beginPacket(node1_IP,udpPort_send);
  udp.write((const uint8_t*)uint16Buff,8);
  udp.endPacket();
}
